#include "Misc.h"
#include <sstream>
using namespace std;

//Default CTOR
Misc::Misc()
{
	Misc::predefined.push_back("long"); 
	Misc::predefined.push_back("short");
	Misc::predefined.push_back("int");
	Misc::predefined.push_back("float");
	Misc::predefined.push_back("double");
	Misc::predefined.push_back("void");
	Misc::predefined.push_back("function");
	///////////////////////////////////////////////////////
	Misc::keywords1.push_back("if");
	Misc::keywords1.push_back("else");
	Misc::keywords1.push_back("for");
	Misc::keywords1.push_back("while");
	///////////////////////////////////////////////////////
	Misc::keywords2.push_back("class");
	Misc::keywords2.push_back("public");
	Misc::keywords2.push_back("private");
	Misc::keywords2.push_back("const");
	Misc::keywords2.push_back("virtual");
	///////////////////////////////////////////////////////
	Misc::operators.push_back("++");
	Misc::operators.push_back("--");
	Misc::operators.push_back("==");
	Misc::operators.push_back(".");
	Misc::operators.push_back("=");
	Misc::operators.push_back("+");
	Misc::operators.push_back("-");
	Misc::operators.push_back("*");
	Misc::operators.push_back("&");
	Misc::operators.push_back("<<");
	Misc::operators.push_back(">>");
	///////////////////////////////////////////////////////
	Misc::delimiters.push_back("{");
	Misc::delimiters.push_back("(");
	Misc::delimiters.push_back(")");
	Misc::delimiters.push_back("}");
	Misc::delimiters.push_back("[");
	Misc::delimiters.push_back("]");
	Misc::delimiters.push_back(";");
	Misc::delimiters.push_back("<");
	Misc::delimiters.push_back(">");
	Misc::delimiters.push_back("=");
	Misc::operators.push_back("+");
	Misc::operators.push_back("-");
	Misc::operators.push_back("*");
	Misc::operators.push_back("&");
}
	
//DTOR
Misc::~Misc(){}

Misc::Misc(const Misc& m)
{
	Misc::delimiters = m.delimiters;
	Misc::keywords1 = m.keywords1;
	Misc::keywords2 = m.keywords2;
	Misc::operators = m.operators;
	Misc::predefined = m.predefined;

}

vector<string> Misc::predefined;
vector<string> Misc::keywords1;
vector<string> Misc::keywords2;
vector<string> Misc::operators;
vector<string> Misc::delimiters;

string Misc::intToString(int i){
	std::string s;
    std::stringstream out;
	out<<i;
	s = out.str();
	return s;
}

